#include <bits/stdc++.h>

//* FOR C++ < 14
namespace std {
    template <>
    struct less<void> {
        template <class A, class B>
        auto operator()(const A &a, const B &b) -> decltype(a < b) {
            return a < b;
        }
    };

}
//*/

template<class InputIt1, class InputIt2, class OutputIt,
         class Compare = std::less<void>>
OutputIt my_merge(InputIt1 first1, InputIt1 last1,
               InputIt2 first2, InputIt2 last2,
               OutputIt d_first, Compare comp = Compare()) {
    while (first1 != last1 && first2 != last2) {
        if (comp(*first1, *first2)) {
            *(d_first++) = *(first1++);
        } else {
            *(d_first++) = *(first2++);
        }
    }
    return std::copy(first2, last2, std::copy(first1, last1, d_first));
}

template<class InputIt1, class InputIt2, class OutputIt,
         class Compare = std::less<void>>
OutputIt my_move_merge(InputIt1 first1, InputIt1 last1,
               InputIt2 first2, InputIt2 last2,
               OutputIt d_first, Compare comp = Compare()) {
    while (first1 != last1 && first2 != last2) {
        if (comp(*first1, *first2)) {
            *(d_first++) = std::move(*(first1++));
        } else {
            *(d_first++) = std::move(*(first2++));
        }
    }
    return std::move(first2, last2, std::move(first1, last1, d_first));
}

template <typename It, class Compare=std::less<void>>
void my_sort(It begin, It end, Compare comp = Compare()) {
    typedef typename std::iterator_traits<It>::value_type T;
    auto n = std::distance(begin, end);
    if (n <= 1)
        return;
    It med = std::next(begin, n / 2);
    my_sort(begin, med, comp);
    my_sort(med, end, comp);
    std::vector<T> temporary(n);
    my_move_merge(begin, med, med, end, temporary.begin(), comp);
    std::move(temporary.begin(), temporary.end(), begin);
}

template <typename T>
std::vector<T> read_array(std::istream &in=std::cin) {
    int n;
    in >> n;
    std::vector<T> result(n);
    for (int i = 0; i < n; ++i) {
        std::cin >> result[i];
    }
    return result;
}

int main() {
    auto a = read_array<int>();
    my_sort(a.begin(), a.end());
    std::copy(a.begin(), a.end(), std::ostream_iterator<int>(std::cout, " "));
    std::cout << std::endl;
}

